Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: subscribe to initial queue position in botonic #2975

Merged

Conversation

vanbasten17
Copy link
Contributor

Description

  • Allow subscribe to new helpdesk event Initial Queue Position.

To document / Usage example

// routes

export const routes = (request) => {
  console.log("REQUEST", request);
  return [
    {
      path: "initial_queue_position",
      type: "case_event_initial_queue_position",
      action: InitialQueuePosition,
    },
    { path: "agent", text: /^handoff$/i, action: TransferAgent },
    { path: "thanks-for-contacting", action: Thanks },
  ];
};

// action

export default class extends React.Component {
  static async botonicInit(request) {
    const input = request.input;
    console.log("INPUT", input);
    return {
      input,
    };
  }
  render() {
    return (
      <Text>
        QUEUE POSITION: {"\n"}
        Current: {this.props.input.current_queue_position} {"\n"}
        Total waiting: {this.props.input.total_queue_waiting_cases_number}
      </Text>
    );
  }
}

Testing

The pull request...

  • has unit tests
  • has integration tests
  • doesn't need tests because... [provide a description]

@vanbasten17 vanbasten17 force-pushed the BLT-1371-botonic-to-use-queue-initial-position-event branch from 32b3116 to 035ddca Compare February 13, 2025 07:53
@vanbasten17 vanbasten17 force-pushed the BLT-1371-botonic-to-use-queue-initial-position-event branch from 035ddca to 42759dc Compare February 13, 2025 08:26
@vanbasten17 vanbasten17 force-pushed the BLT-1371-botonic-to-use-queue-initial-position-event branch from c238729 to ccae5be Compare February 13, 2025 08:57
@vanbasten17 vanbasten17 merged commit 576fb72 into master-lts Feb 13, 2025
3 of 4 checks passed
@vanbasten17 vanbasten17 deleted the BLT-1371-botonic-to-use-queue-initial-position-event branch February 13, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants